package com.foodchain.controller;


import com.foodchain.entity.ActivitySchedule;
import com.foodchain.service.ActivityScheduleService;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ClassName 活动日程
 * @Description TODO
 * @Author duyuanyuan
 * @Date 2019/3/19 16:32
 * @Version 1.0
 **/
@Controller
@RequestMapping("/activitySchedule")
public class ActivityScheduleController extends BaseController {

    @Resource
    private ActivityScheduleService activityScheduleService;


    /*
     * 功能描述:查询活动日程信息
     * @param:  * @param page
     * @param size
     * @return: java.lang.String
     * @auther: duyuanyuan
     * @date: 2019/3/27 17:26
     */
    @RequestMapping("/list")
    @ResponseBody
    public String list(@RequestParam(value = "page", defaultValue = "0") Integer page,
                       @RequestParam(value = "size", defaultValue = "10") Integer size){
        Page<ActivitySchedule> data = activityScheduleService.findList(page,size);
        return JsonCode(0,"success",data);
    }
}
